ga.view.interfaces
Class MouseListener

java.lang.Object
  extended by ga.view.interfaces.MouseListener
All Implemented Interfaces:
com.jme3.input.controls.ActionListener, com.jme3.input.controls.InputListener
Direct Known Subclasses:
BillardEvaluationState.ClickListener, CamDragListener, MenuState.MenuMouseListener, RoomPlanner.MenuMouseListener, ShowRoomState.DoubleClickListener, StreamingEvaluationState.DragListener, SummaryPostState.SummaryMouseListener

public abstract class MouseListener
extends java.lang.Object
implements com.jme3.input.controls.ActionListener

Abstract class for an mouse listener. Extends ActionListener and adds functions.

Since:
12.08.2012
Author:
Stephan Dreyer

Field Summary
private  boolean enabled
           
private  long lastTime
           
 
Constructor Summary
MouseListener()
          Instantiates a new mouse listener.
 
Method Summary
 boolean isEnabled()
          Checks if is enabled.
abstract  void onAction(java.lang.String name, boolean keyPressed, boolean isDoubleClick, float tpf)
          Callback method for mouse events.
 void onAction(java.lang.String name, boolean keyPressed, float tpf)
           
 void setEnabled(boolean enabled)
          Sets the listener enabled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lastTime

private long lastTime

enabled

private boolean enabled
Constructor Detail

MouseListener

public MouseListener()
Instantiates a new mouse listener.

Since:
12.08.2012
Method Detail

onAction

public final void onAction(java.lang.String name,
                           boolean keyPressed,
                           float tpf)
Specified by:
onAction in interface com.jme3.input.controls.ActionListener

onAction

public abstract void onAction(java.lang.String name,
                              boolean keyPressed,
                              boolean isDoubleClick,
                              float tpf)
Callback method for mouse events. Subclasses must implement this to add custom code.

Parameters:
name - Name of the action.
keyPressed - true if the key is still pressed.
isDoubleClick - true if it is a double click.
tpf - The time per frame.
Since:
12.08.2012

setEnabled

public void setEnabled(boolean enabled)
Sets the listener enabled.

Parameters:
enabled - the new enabled state.
Since:
12.08.2012

isEnabled

public boolean isEnabled()
Checks if is enabled.

Returns:
true, if is enabled
Since:
12.08.2012